﻿using ASPApiDemo.Model;
using ASPApiDemo.Service;
using AutoMapper;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace ASPApiDemo.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class UserController : ControllerBase
    {
        [HttpGet(Name = "GetUser")]
        public async Task<object> Get()
        {
            var userService = new UserService();
            var userList = await userService.Query();
            return userList;
        }
    }
}
